package com.common.operationLog.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 操作日志记录表
 * </p>
 *
 * @author xiaopeng
 * @since 2025-05-25
 */
@Getter
@Setter
@TableName("operation_log")
public class OperationLogEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    private Long id;

    @Schema(description = "操作模块code")
    private String operationModuleCode;

    @Schema(description = "操作模块名称")
    private String operationModuleName;

    @Schema(description = "操作类型code")
    private String operationTypeCode;

    @Schema(description = "操作类型名称")
    private String operationTypeName;

    @Schema(description = "业务id")
    private Long bizId;

    @Schema(description = "业务code")
    private String bizCode;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "请求参数")
    private String requestParams;

    @Schema(description = "变更前内容")
    private String beforeContent;

    @Schema(description = "变更后内容")
    private String afterContent;

    @Schema(description = "变更内容")
    private String changeContent;

    @Schema(description = "变更前附件")
    private String beforeFile;

    @Schema(description = "变更后附件")
    private String afterFile;

    @Schema(description = "是否软删除 0:未删除 1:删除")
    @TableLogic
    private Byte isDeleted;

    @Schema(description = "操作人")
    private Long operationBy;

    @Schema(description = "操作人")
    private String operationByName;

    @Schema(description = "操作时间")
    private LocalDateTime operationTime;

    @Schema(description = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
